#ifndef FAST_VECTOR
#define FAST_VECTOR
#include <algorithm>
#include <string>

class fast_vector
{
private :
   union digits_container 
   {
      int digit_;
      int* digits_;
   };
   digits_container digits_;
   
   size_t size_;
   size_t capacity_;
   void ensure_increase_capacity(size_t);
   void ensure_decrease_capacity();
public :

   fast_vector();
   ~fast_vector();
   fast_vector(fast_vector const &);
   const int operator [](size_t) const;
   int& operator [](size_t);
   void push_back(int);
   void swap(fast_vector&);
   size_t size() const;
   void pop_back();
   void clear();
   int back();
   void erase(size_t, size_t);
   void resize(size_t);
   void reverse();
   fast_vector& operator =(const fast_vector&);
};
#endif